package news.service;

import news.dao.ISelTopicDao;
import news.dao.SelTopicImpl;
import news.example.Topic;
import news.util.BaseDao;

import java.util.ArrayList;
import java.util.List;

/**
 * @author JiangJ
 * @date 2022/3/2 20:40
 */
public class SelTopicServiceImpl implements ISelTopicService {
    private final BaseDao baseDao = new BaseDao();
    private final ISelTopicDao iSelTopicDao = new SelTopicImpl();

    /**
     * 查询
     *
     * @return
     */
    @Override
    public List<Topic> findAllTopic() {
        return iSelTopicDao.findAllTopic();
    }

    /**
     * 根据id查询
     *
     * @param id
     * @return
     */
    @Override
    public List<Topic> findNameById(Integer id) {
        return iSelTopicDao.findNameById(id);
    }

    @Override
    public List<Topic> getTopicName() {
        return iSelTopicDao.getTopicName();
    }
}
